package com.oscroll.strategy.lesson.pay;

public class PayStrategyTest {

    public static void main(String[] args) {
        // 用户参数 0 支付宝 , 1 银联
        int type = 0;

        switch (type){
            case 0:
                new Order().pay(PayType.ALI_PAY);
            case 1:
                new Order().pay(PayType.UNION_PAY);
        }

        switch (type){
            case 0:
                new Order().setPayment(new AliPay()).pay2();
            case 1:
                new Order().setPayment(new UnionPay()).pay2();
        }

    }

}
